<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<head>
    <title>检验科</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/x-admin.css" media="all">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/pag.css" media="all">
    <link href="favicon.ico" rel="shortcut icon">
</head>

<div class="x-nav"><span class="layui-breadcrumb"> <a><cite>首页</cite></a> <a><cite>医技科室管理</cite></a> <a><cite>医科室</cite></a> </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon"
                                                                        style="line-height:30px">ဂ</i></a></div>
<div class="x-body">
    <form class="layui-form x-center" action="${pageContext.request.contextPath}/keshi/jianyan" style="width:500px">
        <div class="layui-form-pane">
            <div class="layui-form-item">
                <div class="layui-input-inline" style="width:400px">
                    <input type="text" name="name" placeholder="搜索内容" autocomplete="off" class="layui-input"
                           value="${name}"/>
                </div>
                <div class="layui-input-inline" style="width:80px">
                    <button class="layui-btn" lay-submit="" lay-filter="sreach" type="submit"><i class="layui-icon">&#xe615;</i>
                    </button>
                </div>
            </div>
        </div>
        <input name="currentPageNo" type="hidden" value="1"/>
    </form>
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li><a href="${pageContext.request.contextPath}/keshi/add">放射科资料管理</a></li>
            <li class="layui-this"><a href=".${pageContext.request.contextPath}/keshi/jianyan">检验科资料管理</a></li>
            <li><a href="${pageContext.request.contextPath}/keshi/gonneng">功能科资料管理</a></li>
        </ul>
        <div class="layui-tab-content">
            <div class="" >
                <form class="layui-form layui-form-pane" action="keshi/jianyanform">
                </form>
                <div class="tools">
                    <ul class="toolbar">
                        <li onclick="download_picadd('添加信息','${pageContext.request.contextPath}/jsp/download_jyadd.jsp','600','500')">
                            <span><img src="${pageContext.request.contextPath}/images/t01.png"/></span>添加
                        </li>
                        <%--  <li><span><img src="../images/t06.png" /></span>查看</li>--%>
                    </ul>
                    <span class="x-right" style="line-height:25px"
                          align="left">第${currentPageNo}页/共${totalPageCount}页</span>
                    <span class="x-right" style="line-height:25px">共有数据：${totalCount}条</span></xblock>
                </div>
                <table class="tablelist">
                    <thead>
                    <tr>
                        <th width="9%">姓名</th>
                        <th>检验方式</th>
                        <th>检查结果</th>
                        <th>医嘱</th>
                        <th width="9%">发表时间</th>
                        <th width="8%">医师</th>
                        <th width="8%">操作</th>
                    </tr>
                    </thead>
                    <tbody id="x-img">
                    <c:forEach var="janyan" items="${janYanList}" varStatus="state">
                        <tr>
                            <td name="userName">${janyan.userName}</td>
                            <td name="jFangShi">${janyan.jFangShi}</td>
                            <td name="jJieGuo">${janyan.jJieGuo}</td>
                            <td name="jJieGuo">${janyan.yYiZhu}</td>
                            <td><fmt:formatDate value="${janyan.updateTime}" pattern="yyyy-MM-dd"/></td>
                            <td name="yiShi">${janyan.yiShi}</td>
                            <td class="td-manage"></a> <a title="删除" onclick="jianyan(${janyan.jId})"
                                                          href="javascript:;"> <i class="layui-icon">&#xe640;</i> </a>
                            </td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </div>
            <div class="page" v-show="show" >
                <input type="hidden" name="totalPageCount" id="totalPageCount" value="${totalPageCount}"/>
                <div class="pagelist">
                    <span class="jump"><a href="javascript:page_nav(document.forms[0],1);"> 首页</a></span>
                    <span class="jump"><a
                            href="javascript:page_nav(document.forms[0],${currentPageNo} - 1)">上一页</a></span>
                    <span class="jump"><a
                            href="javascript:page_nav(document.forms[0],${currentPageNo} + 1)">下一页</a></span>
                    <span class="jump"><a href="javascript:page_nav(document.forms[0],${totalPageCount})">尾页</a></span>
                    <span class="jumppoint">跳转到：</span>
                    <span class="jumpinp"><input type="text" name="inputPage" id="inputPage"/></span>
                    <button type="button" class="jump gobtn"
                            onClick='jump_to(document.forms[0],document.getElementById("inputPage").value)'>GO
                    </button>
                </div>
            </div>
        </div>
    </div>
    <script src="${pageContext.request.contextPath}/lib/layui/layui.js" charset="utf-8"></script>
    <script src="${pageContext.request.contextPath}/js/x-layui.js" charset="utf-8"></script>
    <script src="${pageContext.request.contextPath}/js/zygl/rollpage.js" charset="utf-8"></script>
    <script src="${pageContext.request.contextPath}/js/jquery2.js" charset="utf-8"></script>
    <script src="${pageContext.request.contextPath}/js/js.js" charset="utf-8"></script>
    <script>
        layui.use(['laydate', 'element', 'laypage', 'layer'], function () {
            $ = layui.jquery;//jquery
            laydate = layui.laydate;//日期插件
            lement = layui.element;//面包导航
            laypage = layui.laypage;//分页
            layer = layui.layer;//弹出层
        });
        /*  laydate.render({
              elem: '#test1'
          });*/

        /*图片添加*/
        function download_picadd(title, url, w, h) {
            x_admin_show(title, url, w, h);
        }

        //图片修改
        function download_picedit(title, url, id, w, h) {
            x_admin_show(title, url, w, h);
        }


        $('.tablelist tbody tr:odd').addClass('odd');

        function jianyan(id) {
            layer.open({
                btn: ['yes', 'no'],
                title: ['确认删除', 'font-size:20px;text-align:center'],
                content: '确认删除吗',
                yes: function () {
                    $.ajax({
                        type: "get",
                        url: "/keshi/jydel/" + id,
                        dataType: "json",
                        success: function (data) {
                            var flag = data.retMsg;
                            if (flag) {
                                layer.open({
                                    title: false,
                                    content: '删除成功',
                                    end: function () {
                                        // var index = parent.layer.getFrameIndex(window.name);
                                        window.location.reload()
                                    }
                                })
                            } else {
                                layer.open({
                                    title: false,
                                    content: '删除失败'

                                })
                            }
                        },
                        error: function () {
                            layer.open({
                                title: false,
                                content: '删除异常',
                                end: function () {
                                    // var index = parent.layer.getFrameIndex(window.name);
                                    window.location.reload()
                                }
                            })
                        }

                    })
                }
            })
        }
    </script>


